﻿namespace Mercury.ParticleEngine
{
    /// <summary>
    /// Defines the interface for an object which manages the state of a particle simulation.
    /// </summary>
    public interface IStateManager
    {
        /// <summary>
        /// Initializes particles within the simulation state. This is called when the particle
        /// emitter released new particles.
        /// </summary>
        /// <param name="iterator">An object which can be used to iterate over meta particles
        /// describing the particles which have been released.</param>
        void InitializeState(ref MetaParticleIterator iterator);

        /// <summary>
        /// Updates particles within the simulation state. This is called when the particle
        /// emitter is being updated.
        /// </summary>
        /// <param name="iterator">An object which can be used to iterate over meta particles
        /// describing the particles which need to be updated.</param>
        void UpdateState(ref MetaParticleIterator iterator);

        void Render(ref MetaParticleIterator iterator);
    }
}